<%@ page import="com.conversationboard.model.*" %>
<%@ page import="com.conversationboard.config.*" %>
<%@ page import="com.conversationboard.controller.confirm.Confirm" %>

<%@page pageEncoding="UTF-8"%>
<%@page contentType="text/html;charset=UTF-8"%>

<%@ page import="com.conversationboard.view.MainMenu"%>

<% 
	String siteMessage = SiteMessage.getMessage();

	if (siteMessage == null) {
		request.setAttribute("siteMessage", "");
	} else {
		request.setAttribute("siteMessage", siteMessage);
	}
%>


<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<title>Create a new Site Message</title>
		<link rel="stylesheet" type="text/css" href="<%=Configuration.getInstance().getRoot()%>/Stylesheets/<%=StyleSheets.getStyleSheetFileName(request.getCookies())%>"/>
	</head>

	<body>
	
		<%= MainMenu.display(request.getUserPrincipal()) %>

		<div class="headingblock">
			<h1>Create a message to be displayed on all main pages</h1>
		</div>

		<div class="mainblock">

			<form class="formsection" action="<%=Configuration.getInstance().getRoot()%>/Admin/AdminSiteMessageControllerServlet" method="post">
			 	
				<p>The message can contain HTML markup. The message will last until the server is restarted, or the message is removed.</p>
				<p>An empty message will remove the site message.</p>

			 	<%= Confirm.getKey(request.getUserPrincipal().getName()) %>
			 	
			 	<textarea class="textbox" name="text" rows="10" cols="800">${siteMessage}</textarea><br /><br />
			 	<input type="submit" value="Create" />
			 	
			</form>
		</div>
		
		<!--<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>-->
		<!--<script type="text/javascript">_uacct = "UA-1148679-1";urchinTracker();</script>--> 
		
	</body>
	
</html>
